package cn.tedu.qxhouserent.house.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@Accessors(chain = true)
public class NewsDetailUpdateInfoParam implements Serializable {
    @NotEmpty(message = "题目不能为空！")
    @ApiModelProperty(value = "题目",required = true)
    private String title;

    @NotEmpty(message = "作者不能为空！")
    @ApiModelProperty(value = "作者",required = true)
    private String author;

    @NotEmpty(message = "正文内容不能为空！")
    @ApiModelProperty(value = "正文", required = true)
    private String content;


    @NotNull(message = "资讯分类id不能为空！")
    @Range(min = 1,max = 7,message = "资讯分类id必须在1-7之间！")
    @ApiModelProperty(value = "资讯分类id",required = true)
    private Long newsCategoryId;


}
